/**
 * 找出数组中的第一个回文字符串
 *
 * @USER: Administrator
 * @DATE: 2024/10/5 下午1:53
 * @VERSION: 1.0.0
 */
public class LC2108 {
    public static void main(String[] args) {
    }

    public String firstPalindrome(String[] words) {
        for (String word : words) {
            boolean flag = true;
            for (int i = 0; i < word.length()/2; i++) {
                if (word.charAt(i) == word.charAt(word.length()-i-1)) {

                }else {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                return word;
            }
        }
        return "";
    }

}
